package com.red.star.wechat.data.entity;

import com.red.star.wechat.data.utils.DateUtil;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import java.util.Date;

/**
 * @author nofish.yan@gmail.com
 * @date 2018/8/24.
 * 按钮点击统计(以天为单位)
 */
@Data
@NoArgsConstructor
@Table(name = "stat_daily_button_view")
public class DailyButtonView extends BaseEntity {

    private String mallCode;

    private Integer fansId;

    private String pageUrl;

    private String button;

    private Integer viewCount;

    private Date day;

    private String buttonName;

    public DailyButtonView(String mallCode, Integer fansId, String pageUrl, String button, Integer viewCount, String day) {
        this.mallCode = mallCode;
        this.fansId = fansId;
        this.pageUrl = pageUrl;
        this.button = button;
        this.viewCount = viewCount;
        this.day = DateUtil.getDateAsYYYYMMDD(day);
    }

}
